import React from 'react';
import {Button,Dropdown,Menu,Icon} from 'antd';
export default function(){

  return [{
    title: '姓名',
    dataIndex: 'name',
    key: 'name',
    render: (text,record) => {
        return <a href="javascript:;">{record.name}</a>;
    },
  },
   {
    title: '手机号',
    dataIndex: 'phone',
  }, 
  {
    title: '上次使用时间',
    dataIndex: 'lastDate',
  },
  {
    title: '剩余次数',
    dataIndex: 'count',
  },
   {
    title: '操作',
    key: 'action',
    width:300,
    render:(text,record)=>{
      const moreMenu = (<Menu>
        <Menu.Item>详情</Menu.Item>
        <Menu.Item>账单</Menu.Item>
        <Menu.Item>删除</Menu.Item>
      </Menu>)

      // console.log(this);        

        return (<div>
            <Button size='small' type='primary' onClick={()=>{
              this.reduceAction(text);
            }}>减次</Button>
            <Button size='small' style={{marginLeft:'10px'}} type='danger'>充值</Button>
            <Dropdown overlay={moreMenu} placement="bottomLeft">
              <Button size='small'  style={{marginLeft:'10px'}}>更多<Icon type="down" /></Button>
            </Dropdown>
        </div>);
    }
   
  }]
};